<template>
	<view class="seach" :style="{'background':config.background}" @click="haodoClik">
		<view class="my-search-box" :style="{'border-radius':config.radius + 'px'}">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		props:{
			config:{
				type:Object,
				default:()=>({
					background: '#ffaa00',
					radius:18
				})
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			haodoClik(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
.seach{
	height: 50px;
	display: flex;
	align-items: center;
	padding: 0 10px;
	.my-search-box{
		background: #FFFFFF;
		width: 100%;
		height: 36px ;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #b6b6b6;
		.placeholder{
			font-size: 15px;
			margin-left: 5px;
		}
	}
}
</style>
